import request from "@/utils/request";

//分页查询
export const queryPageApi = (data) => request.get("/roles", { params: data });

//2. 删除角色
export const deleteApi = (id) => request.delete(`/roles/${id}`);

//3. 添加角色
export const addApi = (data) => request.post("/roles", data);

//4. 根据ID查询
export const queryByIdApi = (id) => request.get(`/roles/${id}`);

//5. 修改角色
export const updateApi = (data) => request.put("/roles", data);

//6. 查询所有角色
export const queryAllApi = () => request.get("/roles/list");
